from tests import BlogLoginTest
from tests import BlogListTest
from tests import BlogDetailTest
from tests import BlogEditTest
from common.Utils import BlogDriver
from tests.BlogDetailTest import BlogDetail

if __name__ == "__main__":

    # blog_login_instance = BlogLoginTest.BlogLogin()
    # blog_login_instance.BlogSucText()
    # blog_list_instance = BlogListTest.BlogList()
    # #登录状态下测试博客列表页
    # blog_list_instance.BlogLoginListTest()
    # #退出博客登录
    # blog_list_instance.QuitBlogLoginListText()
    # #未登录状态下测试博客列表页
    # blog_list_instance.NotBlogLoginListTest()
    # BlogDriver.driver.quit()

    # blog_login_instance = BlogLoginTest.BlogLogin()
    # blog_login_instance.BlogSucText()
    # blog_dateil_instance = BlogDetailTest.BlogDetail()
    # #测试登录状态下的详情页
    # blog_dateil_instance.BlogLoginDetailTest()
    # #测试登录状态下详情页删除第一篇文章
    # blog_dateil_instance.DeleteBlogLoginDetailTest()
    # #退出登录
    # blog_list_instance = BlogListTest.BlogList()
    # #退出博客登录
    # blog_list_instance.QuitBlogLoginListText()
    # blog_dateil_instance.NotBlogLoginDetailTest()

    #博客编辑页面的测试
    # blog_login_instance = BlogLoginTest.BlogLogin()
    # blog_login_instance.BlogSucText()
    # blog_edit_instance = BlogEditTest.BlogEdit()
    # blog_edit_instance.BlogLoginEditTest()
    # #然后调用退出博客函数
    # blog_list_instance = BlogListTest.BlogList()
    # blog_list_instance.QuitBlogLoginListText()
    # #再调用未登录状态下，去测试博客编辑页
    # blog_edit_instance.NotBlogLoginEditTest()

    #测试一下，在登录状态下，使用BlogListTest里面退出函数
    blog_login_instance = BlogLoginTest.BlogLogin()
    blog_login_instance.BlogSucText()
    blog_list_instance = BlogListTest.BlogList()
    #测试一下退出函数
    blog_list_instance.QuitBlogLoginListText()
    BlogDriver.driver.quit()

